package com.example.demo.service;

import com.example.demo.mapper.BlogMapper;
import com.example.demo.model.Blog;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BlogService {

    @Resource
    private BlogMapper blogMapper;

    public List<Blog> load(){
        return blogMapper.load();
    }

    public Blog getBlogById(Integer blogId) {
        return blogMapper.getBlogById(blogId);
    }
}
